﻿
/**************************************
 * 
 * author:李朴
 * company:上海沐雪网络科技有限公司
 * website:http://uweixin.cn
 * createDate:2013-11-1
 * update:2014-12-30
 * remark:微商城页面的父类
 * 
 ***********************************/
using MxWeiXinPF.BLL;
using MxWeiXinPF.Common;
using MxWeiXinPF.Model;
using MxWeiXinPF.Web.UI;
using MxWeiXinPF.WeiXinComm;
using Senparc.Weixin;
using Senparc.Weixin.Exceptions;
using Senparc.Weixin.MP;
using Senparc.Weixin.MP.AdvancedAPIs;
using Senparc.Weixin.MP.AdvancedAPIs.User;
using Senparc.Weixin.MP.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Web;


namespace MxWeiXinPF.Templates
{
    public class ShopBasePage : WeiXinPage
    {
        /// <summary>
        /// 模版的物理路径
        /// </summary>
        public string serverPath { get; set; }

        /// <summary>
        /// 模版的虚拟路径，比如/shop/templates/default
        /// </summary>
        public string tPath { get; set; }

        /// <summary>
        /// 模版文件名称
        /// </summary>
        public string templateFileName { get; set; }

        /// <summary>
        /// 微帐号wid
        /// </summary>
        public int wid { get; set; }

       

        //分享js的参数
        public FxModel fxModel = new FxModel();
        public bool isGuanZhu = false;//是否关注了

        /// <summary>
        /// 初始化模版的错误信息
        /// </summary>
        public string errInitTemplates { get; set; }

        public ShopBasePage()
        {
            serverPath = "";
            templateFileName = "";
            errInitTemplates = "";
            wid = MyCommFun.RequestInt("wid");
            if (wid == 0)
            {
                errInitTemplates = "链接地址或者参数错误！";
                return;
            }
            BLL.wx_userweixin wuwBll = new BLL.wx_userweixin();
            bool isExist = wuwBll.wxCodeLegal(wid);
            if (!isExist)
            {
                errInitTemplates = "账号已过期或已被禁用！";
                return;

            }
        } 

         

    }
}
